home *** CD-ROM | disk | FTP | other *** search
- Shadow Development Documentation
- Library Version 5.0
-
- By David Navas
- Updated: 13 Nov 1992
-
- Copyright © 1992 by David Navas
- All Rights Reserved
-
-
- COMPATIBILITY
-
- This document is only required for those upgrading from V4. Anyone
- who has not programmed SHADOW under V4 should not need to read this
- document. Anyone who has V4 files on disk should delete them
- -right- -now-! Anyone who has programmed any apps using shadow 4
- must read this document in its entirety.
-
- Please note that this includes the example demo modules on the WEB
- Data Acq. and Analysis demo distribution disk. This demo will NOT
- run correctly and may CRASH your machine. A new demonstration disk
- will be available ASAP.
-
- Several things have changed in V5 since V4. The most significant of
- these changes is to PROCESS_CLASS. The following library calls are
- no longer available, required, or supported:
- WaitThread()
- InitThread()
- RemoveThread()
-
- Their features have been swallowed up by the new method calls within
- SHADOW itself. However, it is extremely unlikely that anyone has
- created a subclass of PROCESS_CLASS, so this will not directly affect
- anyone. If you have, please call me at (415) 591-2907, and we will
- discuss how you need to alter your code to get the desired results.
-
- What this does affect, however, is the initialization method for the
- PROCESS_CLASS itself. If you have ever created a process -object-
- using either:
- procObject = CreateInstance(NULL, PROCESSCLASS, METACLASS,
- .
- .
- .
- METHOD_END);
- -or-
-
- ProcClass = FindJazzClass(PROCESSCLASS);
- procObj = DoJazzMethod(ProcClass, NULL, METHOD_META_CREATE,
- METHOD_END);
- procObj = DoJazzMethod(procObj, NULL, METHOD_META_INIT,
- .
- .
- .
- METHOD_END);
-
- then you need to pay very close attention!
-
- The METHOD_META_INIT (now and hereafter in this document to be
- referred to by its SHADOW V name, METH_INIT) takes the following
- arguments in the following order:
-
- JSTR -- name of the process to create.
- JOBJ -- The parent object. If no parent object, the
- calling process is used as the parent.
- SEMF -- an optional semaphore to own shared by the started
- process. Semaphore is Release()'d when task exits.
- TAGL -- a NULL terminated array of struct TagItem to send to
- the CreateNewProc invok. If the INIT fails AFTER
- the process is created, the tags' ti_Tag are set
- to TAG_IGNORE, so you don't have to free the
- resources that might be in the TAGL if the process
- fails to be created. (In fact, the ti_Tags are
- set to TAG_IGNORE even if the process successfully
- opens.)
- APTR -- Pointer to an optional ProcessInitFrame. This is
- used as an override array to the ASSOCIATE method
- to allow the METH_INIT to initialize other classes
- of processes in an arbitrarily coplex manner.
- APTR -- Pointer to an optional ProcessHandlerFrame. This is
- used as an override array to the HANDLER method
- to allow METH_INIT to initialize other classes of
- processes in an arbitrarily complex manner.
-
- The last two arguments were never used by SHADOW 4, and may remain
- NULL for the default configuration. Specifying the parent process
- object as your program's process object is the preferred way to
- deal with thread/parent shutdown problems. Previous to this
- version, a semaphore was used instead. While this is still
- supported, it is highly recommended that you use the parent object
- instead. Also, please note, to increase compatibility between new
- and old releases, you may not specify both the SEMF and the JOBJ
- parameters. Pick one or the other, but not both.
-
- There is no parameter for the threadStart() function. The default
- threadStart is -always- used. Please read the PROCESS_CLASS
- description in Introduction.doc (the last topic in that file!) for
- more details on how to customize process startups.
-
- The taglist is the same parameter it has always been (though it might
- be in a different place in the argument list!).
-
- Please reorganize ANY process object creation code you had NOW!
-
-
- ----
-
-
- There have been a great number of other changes in SHADOW, mostly
- additions and further fleshing out of some of the feature set. Most
- importantly, 500k of documentation is included with this release, so
- I suggest you start reading Introduction.doc now (before your brain
- registers that 500k == 250 pages).
-
- Most of the differences between old code and new code is the
- large number of name changes. These have been made to remove some
- naming inconsistencies, and to remove the word "JAZZ" from a product
- which is now called "SHADOW."
-
- To fix the former problem, names like:
- AddNodeBinTree() and RemoveBinNode()
-
- have been unified into:
- AddTreeNode(), RemoveTreeNode()
-
- To fix the latter problem, names like:
- ATTR_JAZZPROCESS and DoJazzMethod()
-
- have been changed to:
- ATTR_SHADOWPROCESS and DoShadow()
-
-
- A compatibility include file is included in the development release
- which will allow you to continue to use the old naming and drift
- slowly to the new names. In addition, the new misc.h include file
- will automatically include this file if the macro symbol
- "SHADOW_4_CONVERT" is declared before misc.h is included....
-
- The include file is named shadow4convert.h, and I suggest you
- actually read through the file to see all of the name changes
- (there are quite a few).
-
- In addition to these minor name changes, a number of symbols and flag
- values have changed as well. Recompiling with the new includes will
- fix most of these problems, however, this means that it is
- -impossible- to run the your old compiled programs with the new
- SHADOW! A recompile is -absolutely- -necessary-.
-
- There are three more changes which you will not be able to fix by mere
- recompilation. The first is that MethodFuncParse()'s argument list
- has changed (it takes an additional parameter which you should
- set to zero), and the argument order has been changed to increase
- the efficiency of the glue code for DICE. Please note that you
- probably have never used MethodFuncParse()!
-
- Also, the METHOD_FLAG_RTRN_ME flag no longer exists. The bit that
- it used to use has had its meaning inverted. Thus, you can now
- define methods that no longer have return values, as well as
- patches that have no return values. Use METH_FLAG_NO_RTRN for
- methods and patches that have no return values. For patches that
- do have return values, you may leave this bit unset -- there is
- no need for METHOD_FLAG_RTRN_ME. As always, for methods, you may
- leave this bit unset for methods that return values....
-
- Lastly, if you ever used 'MRFO' for passing data in objects around,
- the entry has gotten more functionality, but grown incompatible.
- for any method arguments that were MRFOs, please change the
- METHOD_REF (now referred to as ARGUMENT_TAGs) from:
- {'MRFO, 4, 0}
- to:
- {'MRFO', 4, 8}
- -or-
- ARG_MRFO(8) <-- preferred
-
- You can now pass pointers to data within objects by letting the
- third field in the ARGUMENT_TAG (or the argument within the definition
- macro ARG_MRFO) be the offset of the data from the start of the
- object. This allows the object to be correctly resource tracked
- and not copied when sending the data asynchronously. This is most
- useful for sending data within ClasslessObjects, where the data
- starts from an offset of 12, instead of 8 as in normal objects....
-
-
-
- SHADOW V is considered the full production release of SHADOW. As
- such, future changes like SHADOW 4 --> SHADOW V will be avoided at
- all costs to allow you to create real commercial programs without the
- hassle of recompiling and backwards compatibilty issues. However,
- these changes were necessary to facilitate the release of a
- production version, as many of the naming schemes were incoherent or
- just plain incorrect.
-
- Thanks for using SHADOW, and I hope the upgrade goes as smoothly for
- you as it did for my own commercial apps!
-
- Dave Navas
-